home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / utils / console / svgatext.3 / svgatext / SVGATextMode-1.3 / XFREE / patches / resize.patch < prev    next >
Encoding:
Text File  |  1995-04-22  |  1.5 KB  |  36 lines

  1. --- ./drivers/char/tty_io.c.orig    Wed Feb  8 13:41:25 1995
  2. +++ ./drivers/char/tty_io.c    Wed Feb  8 14:19:30 1995
  3. @@ -1289,6 +1289,7 @@
  4.      pid_t pgrp;
  5.      unsigned char    ch;
  6.      char    mbz = 0;
  7. +    extern unsigned long video_num_columns, video_num_lines;
  8.      
  9.      tty = (struct tty_struct *)file->private_data;
  10.      if (tty_paranoia_check(tty, inode->i_rdev, "tty_ioctl"))
  11. @@ -1315,6 +1316,11 @@
  12.                           sizeof (struct winsize));
  13.              if (retval)
  14.                  return retval;
  15. +            if (tty->driver.type == TTY_DRIVER_TYPE_CONSOLE) {
  16. +                /* maybe the console was resized after opening */
  17. +                tty->winsize.ws_row = video_num_lines;
  18. +                tty->winsize.ws_col = video_num_columns;
  19. +            }
  20.              memcpy_tofs((struct winsize *) arg, &tty->winsize,
  21.                      sizeof (struct winsize));
  22.              return 0;
  23. --- ./drivers/char/console.c.orig    Fri Jan 27 21:08:25 1995
  24. +++ ./drivers/char/console.c    Wed Feb  8 13:51:43 1995
  25. @@ -196,8 +196,8 @@
  26.  static unsigned char    video_page;        /* Initial video page (unused)  */
  27.         unsigned short    video_port_reg;        /* Video register select port    */
  28.         unsigned short    video_port_val;        /* Video register value port    */
  29. -static unsigned long    video_num_columns;    /* Number of text columns    */
  30. -static unsigned long    video_num_lines;    /* Number of text lines        */
  31. +       unsigned long    video_num_columns;    /* Number of text columns    */
  32. +       unsigned long    video_num_lines;    /* Number of text lines        */
  33.  static unsigned long    video_size_row;
  34.  static unsigned long    video_screen_size;
  35.  static int can_do_color = 0;
  36.